﻿namespace com.vs.DataAccess
{
    using System;
    using System.Data;

    internal interface IDbFactory
    {
        IDbCommand CreateCommand();
        IDbCommand CreateCommand(string commandText, IDbConnection connection);
        IDbConnection CreateConnection(string connectionString);
        IDbConnection CreateConnection(string connectionString, int timeout);
        IDataAdapter CreateDataAdapter(IDbCommand cmd);
        IDataParameter CreateOutputParameter(string name, DbType type, int size);
        IDataParameter CreateParameter();
        IDataParameter CreateParameter(string name);
        void DeriveParameters(IDbCommand cmd);
        int ExecuteInsert(IDbCommand cmd, string key);
        string GetParameterName(string name);
        bool IsOperationToBeRetried(Exception exp);
        string PrepareInsert(string cmdText);
        string ProcessSqlText(string cmdText);
        void RemoveReturnValueParameters(IDataParameterCollection parameters);
    }
}

